﻿@using NOSDC.Services.Extensions
@model IEnumerable<NOSDC.Pocos.Job>
@section Title
{
    Job postings
}
@section MetaTags{ }

<div id="jobContainer">
    <div class="newsPosting">
        <div>
            <div class="leftIcon">
            </div>
            <div class="titleWrapper">
                <div class="newsTitle">Job postings</div>
                <div class="newsDate"></div>
            </div>
        </div>
        <div class="rightIcon">
        </div>
    </div>
    <div style="margin-top:10px; ">If you would like to have your job posting placed on this page, feel free to use our @Html.ActionLink("contact", "ContactUs", "Home", null, null) page, or send an email to NOSDC@Live.ca with your requirements.</div>
    @if (Model != null && Model.Any())
    {
        foreach (var item in Model)
        {
            <div class="job">
                <div style="color:#236B8E;width:100%; height:20px;border-bottom:1px solid #AAA;">
                    <div style="float:left; font-weight:bold;">@Html.ActionLink(@item.Employer + " - " + @item.Title, "Details", "Jobs", new { JobID = item.Id,  Title = item.Title.ToSeoUrl() }, null)</div>
                    <div style="float:right; font-size:10px;">@item.DatePosted.ToLongDateString()</div>
                </div>
                <div style="margin-top:5px;">Salary: @(String.IsNullOrWhiteSpace(item.Salary) ? "Negotiable" : item.Salary)</div>
                <div>Location: @item.Location</div>
                <div style="margin-top:5px;"> @Html.Raw(item.Description)</div>
                <div style=" font-size:9px; color:#aaa; margin-top:5px;">Expires on @item.DateExpires.ToLongDateString()</div>
            </div>
        }
    <div style="color:#236B8E; text-align:center; margin-top:15px; font-size:9px; padding-bottom:25px;font-weight:bold;">If this job posting belongs to you and has not been posted with your consent, please @Html.ActionLink("contact us.", "ContactUs", "Home", null, null)</div>
    }
    else
    {
        <div style="height: 100px; vertical-align: middle; text-align: center; line-height: 100px; color: #236B8E; font-weight: bold; font-size: 16px;">
            There are currently no job listings available.
        </div>
    }
 </div>

@section Right
{
    @{
        Html.RenderAction("GetUpcomingEvent", "Events");
    }
}

@section JavaScript{
    <script src="../../Scripts/comments.js" type="text/javascript"></script>
    <script type="text/javascript">
        $("#Jobs").addClass("selected");
    </script>
}